package com.srxz.mobilepharmacy.entity.procedure;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import javax.persistence.*;
import java.io.Serializable;
import java.math.BigDecimal;
import java.math.BigInteger;

/**
 * @Author wgchao
 * @Description 药品盘点-存储过程-{mr_prfn_new: 获取最新单据号, mr_prfn_save: 保存单据}
 * @Date 1:29 PM 2018/12/28
 * @Param 
 * @return 
 **/
@Entity
@Table(name = "MrPrfn")
@NamedStoredProcedureQueries({
        // 保存明细-盘亏
    @NamedStoredProcedureQuery(name = "mrstkexpsave", procedureName = "mr_stkexp_save"
            ,parameters = {
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "aid", type = BigInteger.class) ,
        @StoredProcedureParameter(mode = ParameterMode.IN, name = "mrn", type = Integer.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "typ", type = Integer.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "pn", type = Integer.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "mid", type = Integer.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "attr", type = Integer.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "bn", type = String.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "vdate", type = Integer.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "quan", type = BigDecimal.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "pri", type = BigDecimal.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "prr", type = BigDecimal.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "pro", type = BigDecimal.class),
            @StoredProcedureParameter(mode = ParameterMode.IN, name = "opt", type = String.class)}),
        //保存明细-盘盈
        @NamedStoredProcedureQuery(name = "mrstkimpsave", procedureName = "mr_stkimp_save"
                ,parameters = {
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "aid", type = BigInteger.class) ,
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "mrn", type = Integer.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "pn", type = Integer.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "mid", type = Integer.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "bn", type = String.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "nd", type = BigDecimal.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "pri", type = BigDecimal.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "prr", type = BigDecimal.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "vdate", type = Integer.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "opitm", type = String.class)}),
        //确认执行出库操作--盘亏
        @NamedStoredProcedureQuery(name = "mrstkexpe", procedureName = "mr_stkexp_e"
                ,parameters = {
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "aid", type = BigInteger.class) ,
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "pn", type = Integer.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "op", type = String.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "opt", type = String.class)}),
        //确认执行出库操作--盘盈
        @NamedStoredProcedureQuery(name = "mrstkimpe", procedureName = "mr_stkimp_e"
                ,parameters = {
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "aid", type = BigInteger.class) ,
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "pn", type = Integer.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "op", type = String.class),
                @StoredProcedureParameter(mode = ParameterMode.IN, name = "opt", type = String.class)})})
@Data
public class MrPrfn implements Serializable {
    @Id
    private Integer id;

}
